//
//  TMWorkingTeacherCell.m
//  国学商家管理
//
//  Created by Tao Li on 2018/6/20.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMWorkingTeacherCell.h"
#import "TMShopCourseModel.h"
@implementation TMWorkingTeacherCell
- (void)awakeFromNib{
    [super awakeFromNib];
    self.contentView.layer.borderWidth = 1.0f;
    self.contentView.layer.borderColor = [UIColor hx_colorWithHexRGBAString:@"#EEEEEE"].CGColor;
    self.imageViewH.contentMode = UIViewContentModeScaleAspectFit;
    self.imageViewH.clipsToBounds = YES;
}
-(void)setModel:(TMShopTeacherModel *)model{
    _model = model;
    [self.imageViewH sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:model.image]] placeholderImage:kPlaceholder];
    self.teacherName.text = model.name;
        for (UIButton *btn in self.starsBtnCollection) {
                if (btn.tag >= (50 + model.star)) {
                    btn.hidden = YES;
                }else{
                    btn.hidden = NO;
                }
        }
}
@end
